import {CModalFormProps} from "@/components/CModalForm/type";
import ProForm, {ModalForm} from "@ant-design/pro-form";
import CFormItem from "@/components/CProForm/CFormItem";


export default (props: CModalFormProps<any>) => {
  return (
    <ModalForm {...props}>
      {
        props.groupList.map(group => {
          return (
            <ProForm.Group>
              {group.itemList.map(item => {
                return (<CFormItem  {...item}/>)
              })}
            </ProForm.Group>
          )
        })
      }
      {props.children}
    </ModalForm>
  )
}


